#import "BWDocumentMetadata.h"


@implementation BWDocumentMetadata

+ (void) initialize
{
    [super initialize];

    [BWDocumentMetadata setVersion: 1];

} // initalize


- (id) init
{
    if (self = [super init]) {
        stuff = [[NSMutableDictionary alloc] init];
    }
    
    return (self);

} // init


- (void) dealloc
{
    [stuff release];

    [super dealloc];

} // dealloc


- (id) valueForUndefinedKey: (NSString *) key
{
    id value;
    value = [stuff valueForKey: key];

    return (value);

} // valueForUndefinedKey


- (void) setValue: (id) value  forUndefinedKey: (NSString *) key
{
    [stuff setValue: value  forKey: key];
} // setValue


- (void) setAuthor: (NSString *) author
{
    [self setValue: author  forKey: @"authorx"];
} // setAuthor


- (NSString *) author
{
    return ([self valueForKey: @"authorx"]);
} // author



- (void) setCopyright: (NSString *) copyright
{
    [self setValue: copyright  forKey: @"copyrightx"];
} // setCopyright


- (NSString *) copyright
{
    return ([self valueForKey: @"copyrightx"]);
} // copyright



- (void) setDesc: (NSString *) description
{
    [self setValue: description  forKey: @"descriptionx"];
} // setDesc


- (NSString *) desc
{
    return ([self valueForKey: @"descriptionx"]);
} // desc


- (void) setNotes: (NSString *) notes
{
    [self setValue: notes  forKey: @"notesx"];
} // setNotes


- (NSString *) notes
{
    return ([self valueForKey: @"notesx"]);
} // notes


- (void) encodeWithCoder: (NSCoder *) coder
{
    [coder encodeObject: stuff];
    
} // encodeWithCoder


- (id) initWithCoder: (NSCoder *) coder
{
    if (self = [super init]) {
        [stuff release];
        
        stuff = [coder decodeObject];
        [stuff retain];
    }

    return (self);

} // coder
 
@end // BWDocumentMetadata

